<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var day = show(prompt("输入年份"),prompt("输入月份"),prompt("输入日"));
    			function show(year,month,day){
    				var arr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
    				var b = 0;
    				for (var i = 0; i < parseInt(month)-1; i++) {
    					b+=arr[i];
    				}
    				if((parseInt(year)%4==0&&parseInt(year)%100!=0)||parseInt(year)%400==0){
    					b+=1;
    				}
    				return b+parseInt(day);
    			}
    			alert("是今年的"+day+"天");
</script>
</body>
</html>